INCLUDES:=./  ./include
SRCS:=$(wildcard *.cc) 
LIBS:=  -lwfrest -lworkflow -lssl -lcrypto -lcrypt
OBJS:=$(patsubst %.cc, %.o, $(SRCS))
SERVER:= SearchServer

# 目标 : 依赖
$(SERVER): main.o SearchServer.o 
	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g -I ../include -I ../bin

%.o:%.cc
	g++ -c $^ -o $@  $(addprefix -I, $(INCLUDES)) -g -I ../include -I ../bin

# HASH:=testHash
# TOKEN:=testToken

# $(HASH): Hash.o testHash.o
# 	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

# $(TOKEN): Token.o testToken.o
# 	g++ $^ -o $@ $(LIBS) $(addprefix -I, $(INCLUDES)) -g

echo:
	echo $(INCLUDES)
	echo $(SRCS)

clean:
	rm -rf $(OBJS) $(SERVER) $(HASH) $(TOKEN)
